#include<stdio.h>
int reverse(long long int number){
	int sum=0,i;
	while(number!=0){
		i=number%10;
		number=number/10;
		sum=sum*10+i;
	}
		return sum;
}
int main(void){
	long long int n;
	scanf("%d",&n);
	printf("%d",reverse(n));
	return 0;
}
